<template>
	<van-popup :show="value" :close-on-click-overlay='false'>
		<view class="PopupBox">
			<view class="PopupTitle">
				{{title}}
			</view>
			<view class="PopupContent" v-if="ifHtml" v-html="content" style="text-align: left;">
			</view>
			<view class="PopupContent" v-else>
				{{content}}
			</view>
			<view class="PopupBtn" @click="changeShow()">
				{{btnText}}
			</view>
		</view>
	</van-popup>
</template>
<script>
	export default {
		props: {
			value: {
				type: Boolean,
				default: false
			},
			title: {
				type: String,
				default: ''
			},
			content: {
				type: String,
				default: ''
			},
			btnText: {
				type: String,
				default: '知道了'
			},
			ifHtml:{
				type:Boolean,
				default:false
			}
		},
		methods: {
			changeShow() {
				this.$emit('change', false)
			}
		},
	}
</script>

<style lang="scss">
	.PopupBox {
		text-align: center;
		background: #FFF;
		width: 600rpx;
		border-radius: 30rpx;
		box-sizing: border-box;
		padding: 40rpx 30rpx 30rpx;

		.PopupTitle {
			font-weight: bold;
			font-size: 32rpx;
			padding: 10rpx 0 20rpx;
		}

		.PopupContent {
			color: #333;
			font-size: 26rpx;
			margin-bottom: 50rpx;
		}

		.PopupBtn {
			font-size: 32rpx;
			color: #1A4FBF;
		}
	}
</style>